using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class incentive_levelMap : EntityTypeConfiguration<incentive_level>
    {
        public incentive_levelMap()
        {
            // Primary Key
            this.HasKey(t => new { t.incentive_level_id, t.role_id });

            // Properties
            this.Property(t => t.incentive_level_id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            this.Property(t => t.role_id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.incentive_level1)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("incentive_level");
            this.Property(t => t.incentive_level_id).HasColumnName("incentive_level_id");
            this.Property(t => t.role_id).HasColumnName("role_id");
            this.Property(t => t.incentive_score).HasColumnName("incentive_score");
            this.Property(t => t.incentive_level1).HasColumnName("incentive_level");
        }
    }
}
